<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('员工编码')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-employee_code" class="form-control" name="row[employee_code]" type="text" value="{$row.employee_code|default=''}" readonly>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('关联用户')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-user_id" class="form-control selectpicker" name="row[user_id]" data-live-search="true">
                <option value="">请选择用户</option>
                {foreach $userList as $id => $username}
                <option value="{$id}" {if $row.user_id == $id}selected{/if}>{$username}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('员工姓名')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-employee_name" data-rule="required" class="form-control" name="row[employee_name]" type="text" value="{$row.employee_name|default=''}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('岗位')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-position" class="form-control" name="row[position]" type="text" value="{$row.position|default=''}" placeholder="如：焊工、抛光工、组装工">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('技能等级')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-skill_level" class="form-control selectpicker" name="row[skill_level]">
                <option value="basic" {if $row.skill_level == 'basic'}selected{/if}>{:__('基础')}</option>
                <option value="intermediate" {if $row.skill_level == 'intermediate'}selected{/if}>{:__('中级')}</option>
                <option value="advanced" {if $row.skill_level == 'advanced'}selected{/if}>{:__('高级')}</option>
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('可操作工序')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-operable_processes" class="form-control selectpicker" name="row[operable_processes][]" multiple data-live-search="true">
                {foreach $processList as $id => $name}
                <option value="{$id}" {if in_array($id, $row.operable_processes|default=[])}selected{/if}>{$name}</option>
                {/foreach}
            </select>
            <span class="help-block">可多选，选择该员工能够操作的工序</span>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('联系电话')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-contact_phone" class="form-control" name="row[contact_phone]" type="text" value="{$row.contact_phone|default=''}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('联系邮箱')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-contact_email" class="form-control" name="row[contact_email]" type="email" value="{$row.contact_email|default=''}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('工时单价')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-hourly_rate" class="form-control" name="row[hourly_rate]" type="number" step="0.01" value="{$row.hourly_rate|default=0}" placeholder="元/小时">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('加班规则')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-overtime_rules" class="form-control" name="row[overtime_rules]" rows="3" placeholder="如：工作日加班1.5倍，节假日2倍">{$row.overtime_rules|default=''}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('状态')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-status" class="form-control selectpicker" name="row[status]">
                <option value="1" {if $row.status == 1}selected{/if}>{:__('正常')}</option>
                <option value="0" {if $row.status == 0}selected{/if}>{:__('隐藏')}</option>
            </select>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
